.TH std::ranges::repeat_view::iterator 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::ranges::repeat_view::iterator \- std::ranges::repeat_view::iterator

.SH Synopsis
   struct /*iterator*/;  (since C++23)
                         (exposition only*)

   The return type of repeat_view::begin.

.SH Member types

   Member type       Definition
                       * std::ptrdiff_t, if Bound is the same as
   index-type            std::unreachable_sentinel_t. Otherwise,
                       * Bound.
                         (exposition-only member type*)
   iterator_concept  std::random_access_iterator_tag
   iterator_category std::random_access_iterator_tag
   value_type        W
                       * /*index-type*/, if /*is-signed-like*/</*index-type*/> is true,
   difference_type     * /*iota-diff-t*/(/*index-type*/) otherwise, where
                         /*iota-diff-t*/ has the same meaning as in iota_view.

   Data members

   Member name        Definition
                      A pointer of type const W* that holds the pointer to the value to
   value_ (private)   repeat.
                      (exposition-only member object*)
   current_ (private) An object of type /*index-type*/ that holds the current position.
                      (exposition-only member object*)

.SH Member functions

   constructor     constructs an iterator
   (C++23)         \fI(public member function)\fP
   operator*       returns the current subrange
   (C++23)         \fI(public member function)\fP
   operator[]      accesses an element by index
   (C++23)         \fI(public member function)\fP
   operator++
   operator++(int)
   operator--      advances or decrements the underlying iterator
   operator--(int) \fI(public member function)\fP
   operator+=
   operator-=
   (C++23)

std::ranges::repeat_view::iterator::iterator

   /*iterator*/() = default;                                  \fB(1)\fP (since C++23)
   constexpr explicit /*iterator*/(                           \fB(2)\fP (since C++23)
       const W* value, /*index-type*/ b = /*index-type*/() );     (exposition only*)

   1) Value initializes the data members:
     * value_ with nullptr_t via its default member initializer;
     * index_ via its default member initializer (= /*index-type*/()).
   2) Value initializes value_ with value and bound_ with b. If Bound is not
   std::unreachable_sentinel_t then b must be non-negative. This constructor is not a
   part of the public interface.

std::ranges::repeat_view::iterator::operator*

   constexpr const W& operator*() const noexcept;  (since C++23)

   Equivalent to return *value_;.

std::ranges::repeat_view::iterator::operator[]

   constexpr const W& operator[]( difference_type n ) const noexcept;  (since C++23)

   Equivalent to return *(*this + n);.

std::ranges::repeat_view::iterator::operator++

   constexpr /*iterator*/& operator++(); \fB(1)\fP (since C++23)
   constexpr void operator++(int);       \fB(2)\fP (since C++23)

   1) Equivalent to ++current_; return *this;.
   2) Equivalent to auto tmp = *this; ++*this; return tmp;.

std::ranges::repeat_view::iterator::operator--

   constexpr /*iterator*/& operator--();   \fB(1)\fP (since C++23)
   constexpr /*iterator*/ operator--(int); \fB(2)\fP (since C++23)

   1) Equivalent to --current_; return *this;. If Bound is not
   std::unreachable_sentinel_t then bound_ must be positive.
   2) Equivalent to auto tmp = *this; --*this; return tmp;.

std::ranges::repeat_view::iterator::operator+=

   constexpr /*iterator*/& operator+=( difference_type n );  (since C++23)

   Equivalent to current_ += n; return *this;. If Bound is not
   std::unreachable_sentinel_t then (bound_ + n) must be non-negative.

std::ranges::repeat_view::iterator::operator-=

   constexpr /*iterator*/& operator-=( difference_type n );  (since C++23)

   Equivalent to current_ -= n; return *this;. If Bound is not
   std::unreachable_sentinel_t, then (bound_ - n) must be non-negative.

.SH Non-member functions

   operator==  compares the underlying iterators
   operator<=> \fI(function)\fP
   (C++23)
   operator+   performs iterator arithmetic
   operator-   \fI(function)\fP
   (C++23)

operator==, <=>(std::ranges::repeat_view::iterator)

   friend constexpr bool operator==( const /*iterator*/& x, const     \fB(1)\fP (since C++23)
   /*iterator*/& y );
   friend constexpr auto operator<=>( const /*iterator*/& x, const    \fB(2)\fP (since C++23)
   /*iterator*/& y );

   1) Equivalent to x.current_ == y.current_.
   2) Equivalent to x.current_ <=> y.current_.

   The != operator is synthesized from operator==.

   These functions are not visible to ordinary unqualified or qualified lookup, and can
   only be found by argument-dependent lookup when iterator is an associated class of
   the arguments.

operator+(std::ranges::repeat_view::iterator)

   friend constexpr /*iterator*/ operator+( /*iterator*/ i,           \fB(1)\fP (since C++23)
   difference_type n );
   friend constexpr /*iterator*/ operator+( difference_type n,        \fB(2)\fP (since C++23)
   /*iterator*/ i );

   Equivalent to i += n; return i;.

   These functions are not visible to ordinary unqualified or qualified lookup, and can
   only be found by argument-dependent lookup when iterator is an associated class of
   the arguments.

operator-(std::ranges::repeat_view::iterator)

   friend constexpr /*iterator*/ operator-( /*iterator*/ i,           \fB(1)\fP (since C++23)
   difference_type n );
   friend constexpr difference_type operator-( const /*iterator*/& x,
                                               const /*iterator*/& y  \fB(2)\fP (since C++23)
   );

   1) Equivalent to i -= n; return i;.
   2) Equivalent to return static_cast<difference_type>(x.current_) -
   static_cast<difference_type>(y.current_);.

   These functions are not visible to ordinary unqualified or qualified lookup, and can
   only be found by argument-dependent lookup when iterator is an associated class of
   the arguments.

.SH Notes

   iterator is always random_access_iterator.
